//: C05:StringConvTest.cpp
#include "Stringconv.h"
#include <complex>
#include <iostream>
using namespace std;

int main(void) {
  int i = 1234;
  cout << "i == \"" << toString(i) << "\"" << endl;
  float x = 567.89;
  cout << "x == \"" << toString(x) <<  "\"" << endl;
  complex<float> c(1.0, 2.0);
  cout << "c == \"" << toString(c) << "\"" << endl;

  i = fromString<int>(string("1234"));
  cout << "i == " << i << endl;
  x = fromString<float>(string("567.89"));
  c = fromString<complex<float>>(string("(1.0,2.0)"));
  cout << "c == " << c << endl;
}